<%-- Pagina principal da aplicacao, a listagem de mercadorias. --%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div>
	<div style="border-bottom: 1px solid #E5E5E5;">
		<h4>Professores</h4>
	</div>
	
	<table class="table table-hover">
		<thead>
			<tr>
				<th>Nome</th>
				<th>E-mail</th>
			</tr>
		</thead>
		<c:forEach items="${professores}" var="professor">
			<tr>
				<td>${professor.nome}</td>
				<td>${professor.email}</td>
				<td><a href="/admin/editar-professor?id=${professor.id}" class="btn btn-small btn-warning">Editar</a></td>
			</tr>
		</c:forEach>
	</table>
	
	<a href="/admin/adicionar-professor"><button class="btn btn-success">Adicionar professor</button></a>
</div>